Washington -LRB- CNN -RRB- Until recently , if you sat in church on Sunday mornings , pollsters could predict where you stood on same-sex marriage .

What a difference a decade makes .

In 2003 , when the Massachusetts Supreme Court became the country 's first to legalize same-sex marriage , less than 30 % of religiously affiliated Americans supported gays ' and lesbians ' right to wed. .

By 2014 , that number had climbed to 47 % , according to a survey conducted by the Public Religion Research Institute . That 's more than the 45 % who said they opposed same-sex nuptials .

The margin is small but statistically significant , said Robert P. Jones , CEO of PRRI , because of the exceptionally large pool of respondents : 40,000 adult Americans . -LRB- Eight percent refused to answer or said they did n't know their stance on same-sex marriage . -RRB-

According to PRRI 's poll , there are now more people of faith who favor marriage equality than stand against it , a dramatic turn in one of this country 's most divisive debates and a generational shift with the potential to sweep through everything from the wedding industry to the 2016 presidential race .

`` There 's been a huge swing in the last decade , '' said Jones . `` There are now big , mainstream groups on both sides of the debate . ''

If the U.S. Supreme Court has been paying attention , it likely saw this trend coming . Each time the high court has considered a case related to same-sex marriage , the pile of amicus briefs from religious groups supporting gay rights has inched a little taller , and the crowds protesting outside their grand marble steps has gradually grown more diverse .

On Tuesday , for example , as the Supreme Court hears oral arguments in Obergefell v. Hodges , a case widely expected to produce a landmark ruling on same-sex marriage , an interfaith coalition of clergy led by the dean of Washington 's National Cathedral is planning to march in support of LGBT rights .

`` I join with many across the spectrum of American faith communities in my hope that the Court 's ruling will permit same-sex marriage in all 50 states , '' the Very Rev. Gary Hall , the cathedral 's dean , said in a statement . `` I trust that their judgment will end discrimination against those who seek God 's blessing on their marriages . ''

Clergy from Hall 's religious denomination , the Episcopal Church , have also submitted an amicus brief in support of same-sex marriage . The brief is endorsed by nearly 2,000 faith leaders , including rabbis , Methodist ministers , Lutheran bishops , seminary professors and Congregationalist chaplains .

Another brief , submitted by the Anti-Defamation League , is signed by Jewish , Hindu and Presbyterian groups . In a reverse of traditional arguments against gay marriage , some members of these groups say their religious rights will be curtailed if states do not allow them to perform same-sex nuptials .

Prominent and powerful religious groups are lined up on the other side as well , including the U.S. Conference of Catholic Bishops , National Association of Evangelicals , Southern Baptist Convention , Assemblies of God and the Church of Jesus Christ of Latter-day Saints , also known as the Mormon church . Together , leaders of these faiths represent more than 120 million Americans .

But as PRRI 's survey shows , there are often differences of opinion between the pulpits and the pews . Despite vocal opposition from the U.S. Catholic Bishops , for example , 60 % of Catholics now favor same-sex marriage . That 's a huge increase from 2003 , when just 35 % backed gay rights , according to survey conducted at the time by the Pew Research Center .

Mainline Protestants -- so-called for their prominence in 20th century American life -- also saw a huge shift in the last decade . While 36 % supported same-sex marriage in 2003 , now 62 % do .

At a glance , the pro-gay marriage faction is now strikingly diverse , encompassing Buddhists , Catholics , Jews and Hindus . But the pro-traditional marriage crowd is just as motley , bridging black Protestants , Mormons , Muslims and white evangelicals , according to PRRI 's survey .

Same-sex marriage rights worldwide

Legalized nationwide : Argentina , Belgium , Canada , Denmark , Iceland , Netherlands , Norway , Portugal , Spain , South Africa , Sweden

Legalized in certain regions : Brazil , Mexico , United States

Civil unions or domestic partnerships : Andorra , Austria , Brazil , Colombia , Czech Republic , Ecuador , Finland , France , Germany , Greenland , Hungary , Ireland , Liechtenstein , Luxembourg , New Zealand , Slovenia , Switzerland , United Kingdom , Uruguay and parts of Australia , Mexico , United States and Venezuela

The survey data comes from PRRI 's American Values Atlas , conducted between April and December of last year . PRRI is a nonpartisan , nonprofit research group that focuses on faith and American culture .

Separate surveys conducted by PRRI and other groups show much of the newfound religious support for same-sex marriage is coming from younger Americans .

Seven in 10 Millennials , for example , support same-sex marriage and say that faith groups alienate young adults by being judgemental on sexual ethics . Half of millennial Republicans say gays and lesbians should be allowed to marry , and 43 % of white evangelical millennials agree .

Those numbers could put GOP presidential candidates in a tight spot , said Jones , as they try to expand their base and appeal to younger Americans .

`` The real challenge for GOP candidates is how can they plant their feet deftly enough not to offend older conservatives in the primaries but still be able to pivot in the general election to a younger generation , '' Jones said .

Politicians may pivot on same-sex marriage , but Bible-believing Christians should not -- even if public opinion turns against them , said Denny Burk , a professor at Boyce College , a Southern Baptist school in Louisville , Kentucky .

`` For me , the number of people who come to the message is not the main issue . There are periods when the Gospel is popular and periods when it 's not . You ca n't base your evaluation of its truthfulness on its popularity at a given historical moment . ''

Still , Burk said he does n't doubt that more millennials accept same-sex marriage , and he fully expects the Supreme Court to legalize gay weddings countrywide this June when the justices render a decision in Obergefell v. Hodges .

But the fight is far from over , Burk said .

`` Just like we 've seen this decades-long culture war with abortion , we 're going to see the same thing with gay marriage . ''

@highlight

There are now more people of faith who favor marriage equality than stand against it , according to a new poll

@highlight

If the U.S. Supreme Court has been paying attention , it likely saw this trend coming